import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/blog-auth/auth/login',
    method: 'post',
    params: data
  })
}

// 获取管理员信息
export function getInfo() {
  return request({
    url: '/blog-admin/back/admin',
    method: 'get'
  })
}

// 更新管理员信息
export function update(data) {
  return request({
    url: '/blog-admin/back/admin',
    method: 'post',
    data
  })
}

// 绑定博客用户
export function bind(params) {
  return request({
    url: '/blog-admin/back/admin/bind',
    method: 'post',
    params
  })
}

export function logout() {
  return request({
    url: '/blog-auth/auth/logout',
    method: 'post'
  })
}
